package com.wicket.okrbff.web.contorller;

import com.wicket.okrbff.biz.service.ChangeColumnService;
import com.wicket.okrbff.biz.service.dto.req.*;
import com.wicket.okrbff.biz.service.dto.res.BffQueryBaseChangeColListRespDto;
import com.wicket.okrbff.biz.service.dto.res.BffReviseBatchContentComRespDto;
import com.wicket.okrbff.biz.service.dto.res.BffReviseNotBatchContentComRespDto;
import com.wicket.okrbff.biz.service.dto.res.BffUndoReviseBaseChangeColRespDto;
import com.wicket.okrbff.common.ro.OkrResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;
import com.wicket.okrframework.integration.FwBaseChangeColumnClient;
import com.wicket.okrframework.integration.dto.ReviseBaseChangeColRespDto;
import com.wicket.okrframework.integration.dto.ReviseBaseChangeColReqDto;
import com.wicket.okrframework.integration.dto.ChangeColumnDto;
import cn.hutool.core.bean.BeanUtil;
import java.util.stream.Collectors;
import com.wicket.okrframework.integration.dto.UndoReviseBaseChangeColRespDto;
import com.wicket.okrframework.integration.dto.UndoReviseBaseChangeColReqDto;
import com.wicket.okrframework.integration.dto.QueryBaseChangeRecordListRespDto;
import com.wicket.okrframework.integration.dto.QueryBaseChangeRecordListReqDto;
import com.wicket.okrframework.integration.FwBaseInductionRecordClient;
import com.wicket.okrframework.integration.dto.BatchQueryInductionRecordListComRespDto;
import com.wicket.okrframework.integration.dto.BatchQueryInductionRecordListComReqDto;
import com.wicket.okrbff.biz.service.dto.res.BffQueryOrgChangeRecordListRespDto;
import cn.hutool.core.collection.CollectionUtil;
import com.wicket.okrbff.biz.service.dto.res.BffReviseOrgAtchContentRespDto;
import com.wicket.okrbff.common.util.CommonFunctionHelper;
import com.wicket.okrbff.biz.service.dto.res.BffUndoReviseDeptInfoRespDto;
import com.wicket.okrbff.biz.service.dto.res.BffReviseDeptInfoRespDto;
import com.wicket.okrbff.biz.service.dto.res.BffUndoReviseOrgAtchContentRespDto;
import com.wicket.okrbff.common.exception.Assert;
import com.wicket.okrframework.integration.dto.ReviseNotBatchContentRespDto;
import com.wicket.okrframework.integration.dto.ReviseNotBatchContentReqDto;
import com.wicket.okrbff.biz.service.dto.res.BffQueryDeptChangeRecordListRespDto;
import com.wicket.okrframework.integration.dto.QueryInductionRecordDetailBorderRespDto;
import com.wicket.okrframework.integration.dto.QueryInductionRecordDetailBorderReqDto;
import com.wicket.okrframework.integration.FwBaseOrgClient;
import com.wicket.okrframework.integration.dto.QueryDeptDetailComBorderRespDto;
import com.wicket.okrframework.integration.dto.QueryDeptDetailComBorderReqDto;
import com.wicket.okrframework.integration.dto.JudgeSubjectLifeCycleBaseChangeColRespDto;
import com.wicket.okrframework.integration.dto.JudgeSubjectLifeCycleBaseChangeColReqDto;
import com.wicket.okrframework.integration.dto.JudgeReviseElementRespDto;
import com.wicket.okrframework.integration.dto.JudgeReviseElementReqDto;
import com.wicket.okrbff.biz.service.dto.res.BffJudgeReviseElementRespDto;
import com.wicket.okrframework.integration.dto.ReviseOrgAtchContentRespDto;
import com.wicket.okrframework.integration.dto.ReviseOrgAtchContentReqDto;
import com.wicket.okrframework.integration.dto.JudgeSubjectLifeCycleBaseChangeColComRespDto;
import com.wicket.okrframework.integration.dto.JudgeSubjectLifeCycleBaseChangeColComReqDto;
import com.wicket.okrapp.integration.FwAppChangeColumnClient;
import com.wicket.okrbff.biz.service.dto.res.BffQueryEvaChangeRecordListRespDto;
import java.util.ArrayList;
import java.util.List;
import com.wicket.okrapp.integration.dto.QueryBizAppChangeColListRespDto;
import com.wicket.okrapp.integration.dto.QueryBizAppChangeColListReqDto;
import com.wicket.okrbff.biz.service.dto.res.BffJudgeAppReviseElementRespDto;
import com.wicket.okrapp.integration.dto.JudgeAppReviseElementRespDto;
import com.wicket.okrapp.integration.dto.JudgeAppReviseElementReqDto;
import com.wicket.okrbff.biz.service.dto.common.BffEvaChangeRecordDto;
import com.wicket.okrapp.integration.dto.UndoReviseBizAppChangeColComRespDto;
import com.wicket.okrapp.integration.dto.UndoReviseBizAppChangeColComReqDto;
import com.wicket.okrbff.biz.service.dto.res.BffUndoReviseEvaBatchTargetRespDto;
import com.wicket.okrbff.biz.service.dto.res.BffQueryEvaChangeRecordListBorderRespDto;

/**
 * @author ：
 * @date ：
 *
 *
 * @version 1.0
 */
@Api(value = "ChangeColumn", tags = {"ChangeColumn"})
@RestController
// @RequestMapping("/oms/changeColumn/")
public class ChangeColumnController {

    @Autowired
    ChangeColumnService changeColumnService;

    /**
   * （1111待确认后删除）B1-修订批次外内容（公共）
   * gen by moon at 8/10/2022, 3:36:50 AM
   */
    @PostMapping("/oms/mgt/changeColumn/reviseNotBatchContentCom")
    @ApiOperation(value = "（1111待确认后删除）B1-修订批次外内容（公共）", response = OkrResult.class)
    public OkrResult<BffReviseNotBatchContentComRespDto> reviseNotBatchContentCom(@RequestBody(required=false) @Validated BffReviseNotBatchContentComReqDto reqDTO){
        return OkrResult.success(changeColumnService.reviseNotBatchContentCom(reqDTO));
    }

    /**
   * B1-1撤销修订底层变更字段（公共）
   * gen by moon at 7/23/2022, 9:48:12 PM
   */
    @PostMapping("/oms/mgt/changeColumn/undoReviseBaseChangeCol")
    @ApiOperation(value = "B1-1撤销修订底层变更字段（公共）", response = OkrResult.class)
    public OkrResult<BffUndoReviseBaseChangeColRespDto> undoReviseBaseChangeCol(@RequestBody(required=false) @Validated BffUndoReviseBaseChangeColReqDto reqDTO){
        return OkrResult.success(changeColumnService.undoReviseBaseChangeCol(reqDTO));
    }

    /**
   * B1-修订批次下内容（公共）
   * gen by moon at 7/23/2022, 9:47:42 PM
   */
    @PostMapping("/oms/mgt/changeColumn/reviseBatchContentCom")
    @ApiOperation(value = "B1-修订批次下内容（公共）", response = OkrResult.class)
    public OkrResult<BffReviseBatchContentComRespDto> reviseBatchContentCom(@RequestBody(required=false) @Validated BffReviseBatchContentComReqDto reqDTO){
        return OkrResult.success(changeColumnService.reviseBatchContentCom(reqDTO));
    }

    /**
     * B1-查底层变更字段列表
     */
    @PostMapping("/oms/mgt/changeColumn/queryBaseChangeColList")
    @ApiOperation(value = "B1-查底层变更字段列表", response = OkrResult.class)
    public OkrResult<BffQueryBaseChangeColListRespDto> queryBaseChangeColList(@RequestBody(required = false) @Validated BffQueryBaseChangeColListReqDto reqDTO) {
        return OkrResult.success(changeColumnService.queryBaseChangeColList(reqDTO));
    }
/**
   * B1-1查询组织变更记录列表(管理)
   * gen by moon at 8/10/2022, 3:38:48 AM
   */
    @PostMapping("/oms/mgt/changeColumn/queryOrgChangeRecordList")
    @ApiOperation(value = "B1-1查询组织变更记录列表(管理)", response = OkrResult.class)
    public OkrResult<BffQueryOrgChangeRecordListRespDto> queryOrgChangeRecordList(@RequestBody(required=false) @Validated BffQueryOrgChangeRecordListReqDto reqDTO){
        return OkrResult.success(changeColumnService.queryOrgChangeRecordList(reqDTO));
    }
/**
   * B1-3修订组织批次下内容(管理)
   * gen by moon at 9/5/2022, 2:09:09 AM
   */
    @PostMapping("/oms/mgt/changeColumn/reviseOrgAtchContent")
    @ApiOperation(value = "B1-3修订组织批次下内容(管理)", response = OkrResult.class)
    public OkrResult<BffReviseOrgAtchContentRespDto> reviseOrgAtchContent(@RequestBody(required=false) @Validated BffReviseOrgAtchContentReqDto reqDTO){
        return OkrResult.success(changeColumnService.reviseOrgAtchContent(reqDTO));
    }
/**
   * B1-3撤销修订部门资料(管理)
   * gen by moon at 8/10/2022, 3:31:14 AM
   */
    @PostMapping("/oms/mgt/changeColumn/undoReviseDeptInfo")
    @ApiOperation(value = "B1-3撤销修订部门资料(管理)", response = OkrResult.class)
    public OkrResult<BffUndoReviseDeptInfoRespDto> undoReviseDeptInfo(@RequestBody(required=false) @Validated BffUndoReviseDeptInfoReqDto reqDTO){
        return OkrResult.success(changeColumnService.undoReviseDeptInfo(reqDTO));
    }
/**
   * B1-3修订部门资料(管理)
   * gen by moon at 9/4/2022, 3:32:20 AM
   */
    @PostMapping("/oms/mgt/changeColumn/reviseDeptInfo")
    @ApiOperation(value = "B1-3修订部门资料(管理)", response = OkrResult.class)
    public OkrResult<BffReviseDeptInfoRespDto> reviseDeptInfo(@RequestBody(required=false) @Validated BffReviseDeptInfoReqDto reqDTO){
        return OkrResult.success(changeColumnService.reviseDeptInfo(reqDTO));
    }
/**
   * B1-3撤销修订组织批次下内容(管理)
   * gen by moon at 8/10/2022, 3:38:50 AM
   */
    @PostMapping("/oms/mgt/changeColumn/undoReviseOrgAtchContent")
    @ApiOperation(value = "B1-3撤销修订组织批次下内容(管理)", response = OkrResult.class)
    public OkrResult<BffUndoReviseOrgAtchContentRespDto> undoReviseOrgAtchContent(@RequestBody(required=false) @Validated BffUndoReviseOrgAtchContentReqDto reqDTO){
        return OkrResult.success(changeColumnService.undoReviseOrgAtchContent(reqDTO));
    }
/**
   * B1-1查询部门变更记录列表(管理)
   * gen by moon at 8/18/2022, 10:22:01 PM
   */
    @PostMapping("/oms/mgt/changeColumn/queryDeptChangeRecordList")
    @ApiOperation(value = "B1-1查询部门变更记录列表(管理)", response = OkrResult.class)
    public OkrResult<BffQueryDeptChangeRecordListRespDto> queryDeptChangeRecordList(@RequestBody(required=false) @Validated BffQueryDeptChangeRecordListReqDto reqDTO){
        return OkrResult.success(changeColumnService.queryDeptChangeRecordList(reqDTO));
    }
/**
   * B1-判断重置修订元素(管理)
   * gen by moon at 9/2/2022, 5:09:31 PM
   */
    @PostMapping("/oms/mgt/changeColumn/judgeReviseElement")
    @ApiOperation(value = "B1-判断重置修订元素(管理)", response = OkrResult.class)
    public OkrResult<BffJudgeReviseElementRespDto> judgeReviseElement(@RequestBody(required=false) @Validated BffJudgeReviseElementReqDto reqDTO){
        return OkrResult.success(changeColumnService.judgeReviseElement(reqDTO));
    }
/**
   * B3-13查询评价模板变更记录列表(管理)
   * gen by moon at 10/23/2022, 2:36:45 PM
   */
    @PostMapping("/oms/mgt/changeColumn/queryEvaChangeRecordList")
    @ApiOperation(value = "B3-13查询评价模板变更记录列表(管理)", response = OkrResult.class)
    public OkrResult<BffQueryEvaChangeRecordListRespDto> queryEvaChangeRecordList(@RequestBody(required=false) @Validated BffQueryEvaChangeRecordListReqDto reqDTO){
        return OkrResult.success(changeColumnService.queryEvaChangeRecordList(reqDTO));
    }
/**
   * B3-判断业务应用重置修订元素(管理)
   * gen by moon at 10/8/2022, 3:11:21 AM
   */
    @PostMapping("/oms/mgt/changeColumn/judgeAppReviseElement")
    @ApiOperation(value = "B3-判断业务应用重置修订元素(管理)", response = OkrResult.class)
    public OkrResult<BffJudgeAppReviseElementRespDto> judgeAppReviseElement(@RequestBody(required=false) @Validated BffJudgeAppReviseElementReqDto reqDTO){
        return OkrResult.success(changeColumnService.judgeAppReviseElement(reqDTO));
    }
/**
   * B3撤销修订评价批次下指标(管理)
   * gen by moon at 11/4/2022, 7:38:13 AM
   */
    @PostMapping("/oms/mgt/changeColumn/undoReviseEvaBatchTarget")
    @ApiOperation(value = "B3撤销修订评价批次下指标(管理)", response = OkrResult.class)
    public OkrResult<BffUndoReviseEvaBatchTargetRespDto> undoReviseEvaBatchTarget(@RequestBody(required=false) @Validated BffUndoReviseEvaBatchTargetReqDto reqDTO){
        return OkrResult.success(changeColumnService.undoReviseEvaBatchTarget(reqDTO));
    }
/**
   * B3-13查询评价模板变更记录列表(管理)(边界)
   * gen by moon at 6/10/2023, 1:13:25 AM
   */
    @PostMapping("/oms/mgt/changeColumn/queryEvaChangeRecordListBorder")
    @ApiOperation(value = "B3-13查询评价模板变更记录列表(管理)(边界)", response = OkrResult.class)
    public OkrResult<BffQueryEvaChangeRecordListBorderRespDto> queryEvaChangeRecordListBorder(@RequestBody(required=false) @Validated BffQueryEvaChangeRecordListBorderReqDto reqDTO){
        return OkrResult.success(changeColumnService.queryEvaChangeRecordListBorder(reqDTO));
    }
}
